<include file="__THEME__/header" />
<link rel="stylesheet" href="../Public/bug.css" type="text/css" media="screen" charset="utf-8" />
<div class="bug_content">
  <!-- 内容 begin  -->
  <div class="bug_main"> <include file="../Public/nav_top" />
    <div style="padding-top:20px;">
      <form action="{:U('bug/bug/doedit')}" method="POST" onsubmit="return checkform();return false;">
        <input type="hidden" name="id" value="{$buginfo.id}">
        <table align="left" width="100%" style="line-height: 35px;" cellpadding="0" cellspacing="0" border="0">
          <tr height="40">
            <td align="right" valign="middle">标题：</td>
            <td align="left" valign="middle"><input id="title" name="title" type="text" class="bug_input_b" style="width:60%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'" value="{$buginfo.title}" maxlength="30" /></td>
          </tr>
          <tr>
            <td align="right" valign="middle">版本：</td>
            <td align="left"><select name="edition" class="bug_input_b">
                <volist id="vo" name="edition">
                  <php>$selected = ($vo['id']==$buginfo['edition'])?'selected':''</php>
                  <option value="{$vo.id}" {$selected}>{$vo.title}</option>
                </volist>
              </select></td>
          </tr>
          <tr>
            <td align="right" valign="middle">类型：</td>
            <td align="left"><select class="bug_input_b" name="catid" class="TextH20">
              <volist id="cat" name="category">
                <php>$selected = ($cat['id']==$buginfo['catid'])?'selected':''</php>
                <option value="{$cat.id}" {$selected}>{$cat.title}</option>
              </volist>
              </select></td>
          </tr>
          <tr>
            <td align="right" valign="middle">浏览器：</td>
            <td align="left" valign="middle"><input type="text" name="browser" id="browser" class="bug_input_b" style="width:30%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'" value="{$buginfo.browser}"></td>
          </tr>
          <tr>
            <td align="right" valign="middle">安装环境：</td>
            <td align="left" valign="middle"><input type="text" name="setting" id="setting" value="{$buginfo.setting}" style="width:30%;" onBlur="this.className='bug_input_b'" onFocus="this.className='bug_input_b_c'"></td>
          </tr>
          <tr>
            <td align="right" valign="top" >内容：</td>
            <td align="left" style="padding-top:10px;">{:W("Edit",array('content'=>$buginfo['content']))}</td>
          </tr>
          <tr>
            <td align="right" valign="top" >&nbsp;</td>
            <td align="left" style="padding-top:10px;"><input type="submit" class="bug_btn_b" value="修 改" /></td>
          </tr>
        </table>
      </form>
    </div>
  </div>
  <!-- 画布 end  -->
  <div class="c"></div>
</div>
<!-- 内容 end -->
<include file="__THEME__/footer" />
<script>

function checkform(){
	if($('#title').val().length < 6){
		Error('标题不能小于6位字符！');
		$('#title').focus();
		return false;
	}
	
	if($.trim($('#browser').val())==''){
		Error('浏览器类型不能为空！');
		$('#browser').focus();
		return false;
	}	
	
	if($.trim($('#setting').val())==''){
		Error('程序运行环境不能为空！');
		$('#setting').focus();
		return false;
	}		

	var html = KE.util.getData('content');
	if(html.length < 6){
		Error('请将问题描述完整');
		$('#content').focus();
		return false;
	}
}
</script>
